home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 17390 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  801 b 

  1. Path: wizard.pn.com!news
  2. From: sudip@spr.com
  3. Newsgroups: comp.lang.c++
  4. Subject: VC++ 4.0 and C++ syntax
  5. Date: Mon, 15 Apr 1996 14:08:39 -0400
  6. Organization: Pioneer Global
  7. Message-ID: <317290A7.57C0@spr.com>
  8. NNTP-Posting-Host: dev3.spr.com
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 2.01 (Win95; U)
  13. CC: sudip@spr.com
  14.  
  15. Greetings,
  16.  
  17. VC++ 4.0 allows the following syntax to obtain the address of
  18. a class member function
  19.  
  20. CObArray Ob;
  21. Ob.SetSize(1);
  22.  
  23. if (0 == Ob.GetSize ) // compiles and links
  24. {
  25.   return;
  26. }
  27.  
  28. The call Ob.GetSize gets the address of the GetSize() fn on
  29. CObArray. Is this legal syntax?...the ARM indicates that the
  30. address of a member function (or a member) is obtained using
  31. the :: operator. 
  32.  
  33.  
  34. Sudip Chakraborty
  35. SPR Inc.
  36.